//
//  AllTypeTableViewCell.m
//  Kaoshiti
//
//  Created by lanou3g on 15/10/22.
//  Copyright (c) 2015年 张蒙恩. All rights reserved.
//

#import "AllTypeTableViewCell.h"

@interface AllTypeTableViewCell()

@property (nonatomic,strong)UILabel *title;
@property (nonatomic,strong)UIImageView *imageViewA;

@end

@implementation AllTypeTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUpSubView];
    }
    return self;
}

- (void)setUpSubView
{
    self.imageViewA = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 80, 100)];
    self.title = [[UILabel alloc]initWithFrame:CGRectMake(100, 50, 200, 30)];
    self.title.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.imageViewA];
    [self.contentView addSubview:self.title];
}
- (void)setAllTypeModel:(AllTypeModel *)allTypeModel
{
    if (_allTypeModel != allTypeModel) {
        _allTypeModel = nil;
        _allTypeModel = allTypeModel;
        [self layOutModel];
    }

}
- (void)layOutModel
{
    self.title.text = self.allTypeModel.title;
    self.imageViewA.image = [UIImage imageNamed:self.allTypeModel.imageName];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
